package com.bana.fvs.model;

import com.bana.fvs.code.DeviceType;
import com.bana.sys.model.TreeNode;
import com.bana.sys.utils.Convert;

import java.util.List;

/**
 * 区域控制器
 */
public class Controller extends TreeNode
{
	//数据库字段
	private int kzqbm;
	private String kzqmc;
	private int kzqbsm;
	private int kzqldkg;
	private int wdbj;
	private int sfsyld;
	private int wdxjjg;
	private int wqbm;
	private int kzqdk;

	//基本信息
	private String wqmc;
	private int ksdz;
	private int jsdz;
	private int ksdz1;
	private int jsdz1;
	private int ksdz2;
	private int jsdz2;
	private int ksdz3;
	private int jsdz3;
	private int wdsl;
	private List<LampAddress> lampAddresses;
	private List<LampAddress> lampAddresses1;
	private List<LampAddress> lampAddresses2;
	private List<LampAddress> lampAddresses3;

	private int wdlddj;
	private int sspl;
	private int zkb;
	private String wdlddjsm;
	private String ssplsm;
	private String zkbsm;

	private int timeIndex;

	private boolean readSuccess1;
	private int startHour1;
	private int startMinute1;
	private int stopHour1;
	private int stopMinute1;
	private int month1;
	private int day1;
	private int wdkz1;
	private String wdkz1sm;
	private int wdld1;
	private int zkb1;
	private String zkb1sm;
	private int hdys1;
	private int mqys1;
	private int hsjsdzsl1;
	private boolean sfsyxl1;

	private boolean readSuccess2;
	private int startHour2;
	private int startMinute2;
	private int stopHour2;
	private int stopMinute2;
	private int month2;
	private int day2;
	private int wdkz2;
	private String wdkz2sm;
	private int wdld2;
	private int zkb2;
	private String zkb2sm;
	private int hdys2;
	private int mqys2;
	private int hsjsdzsl2;
	private boolean sfsyxl2;

	private boolean readSuccess3;
	private int startHour3;
	private int startMinute3;
	private int stopHour3;
	private int stopMinute3;
	private int month3;
	private int day3;
	private int wdkz3;
	private String wdkz3sm;
	private int wdld3;
	private int zkb3;
	private String zkb3sm;
	private int hdys3;
	private int mqys3;
	private int hsjsdzsl3;
	private boolean sfsyxl3;

	private boolean hasSolarEnergyData;
	//电池欠压警告
	private boolean dcqygj;
	//电池电量
	private int dcdl;
	//电池电压
	private String dcdy;
	//太阳能电压
	private String tyndy;
	//充电电流
	private String cddl;

	/**
	 * 是否使用光感亮度
	 */
	private boolean jcld;
	/**
	 * 光感数值
	 */
	private int ggsz;

	/**
	 * 是否转发能见度
	 */
	private boolean zfnjd;

	/**
	 * 控制源
	 */
	private int kzy;
	private String kzysm;

	//版本
	private String version;

	//树节点字段
	@Override
	public String getId() {
		return String.format("%d%d", DeviceType.Controller,kzqbm);
	}
	@Override
	public int getKey() {
		return kzqbm;
	}
	@Override
	public String getName() {
		return kzqmc;
	}
	@Override
	public int getType() {
		return DeviceType.Controller;
	}
	@Override
	public boolean isLeaf() {
		return false;
	}

	//控制器信息
	private int sbzt;
	private String sbztsm;
	private int wdkz;
	private String wdkzsm;
	private int wdld;
	private int ldsc;
	private int mdsc;
	private int hdys;
	private int mqys;
	private int hsjsdzsl;
	private int goodCount;
	private int errorCount;
	private long gxsj;
	private List<Lamp> lamps;
	private int wdcxzt;
	private String wdcxztsm;

	//是否支持文字功能
	private boolean zcwz;
	//雾灯文字
	private List<ControllerText> controllerTexts;

	//雾灯文字参数配置
	/**
	 * 触发手动
	 * bit0=1 满足文字工作条件情况下，触发一次手动文字
	 显示
	 */
	private int cfsd;
	/**
	 * 是否跟随
	 * bit1=0 文字工作时，亮度、周期、占空比跟随雾灯（以
	 * 下 vv、uu、tt 无效）；
	 * bit1=1 文字工作时，亮度、周期、占空比按下面（vv、
	 * uu、tt）参数执行 ；
	 */
	private int sfgs;
	/**
	 * 定时触发
	 * bit2=0 定时触发文字工作,=1 定时不触发文字工作
	 */
	private int dscf;
	/**
	 * 气象触发
	 * bit3=0 气象触发文字工作,=1 气象不触发文字工作
	 */
	private int qxcf;
	/**
	 * 文字模块2
	 * bit4=0 文字工作, bit4=1 文字不工作；
	 */
	private int wzmk2;
	/**
	 * 文字模块1
	 *  bit5=0 文字工作，bit5=1 文字不工作；
	 */
	private int wzmk1;
	/**
	 * 雾灯工作
	 *  bit6=0 雾灯工作；
	 *  bit6=1 雾灯不工作(需要手动解除或手动控制雾灯指
	 *  令自动解除)；
	 */
	private int wdgz;

	/**
	 * 亮度等级
	 */
	private int gs_Lddj;
	/**
	 * 闪烁频率
	 */
	private int gs_Sspl;
	/**
	 * 占空比
	 */
	private int gs_Zkb;

	/**
	 * 当前显示的文字类型编号
	 */
	private int lxbh;

	public String getGxsjsm() {
		return Convert.toTimesm(this.gxsj);
	}

	public void setKzqbm(int kzqbm) {
		this.kzqbm = kzqbm;
	}

	public int getKzqbm() {
		return kzqbm;
	}

	public void setKzqmc(String kzqmc) {
		this.kzqmc = kzqmc;
	}

	public String getSbztsm() {
		return sbztsm;
	}

	public void setSbztsm(String sbztsm) {
		this.sbztsm = sbztsm;
	}

	public String getKzqmc() {
		return kzqmc;
	}

	public int getKzqldkg() {
		return kzqldkg;
	}

	public void setKzqldkg(int kzqldkg) {
		this.kzqldkg = kzqldkg;
	}

	public int getWdbj() {
		return wdbj;
	}

	public void setWdbj(int wdbj) {
		this.wdbj = wdbj;
	}

	public int getSfsyld() {
		return sfsyld;
	}

	public void setSfsyld(int sfsyld) {
		this.sfsyld = sfsyld;
	}

	public int getWdxjjg() {
		return wdxjjg;
	}

	public void setWdxjjg(int wdxjjg) {
		this.wdxjjg = wdxjjg;
	}

	public int getWqbm() {
		return wqbm;
	}

	public void setWqbm(int wqbm) {
		this.wqbm = wqbm;
	}

	public int getSbzt() {
		return sbzt;
	}

	public void setSbzt(int sbzt) {
		this.sbzt = sbzt;
	}

	public String getWqmc() {
		return wqmc;
	}

	public void setWqmc(String wqmc) {
		this.wqmc = wqmc;
	}

	public int getKsdz() {
		return ksdz;
	}
	public int getKsdz1() {
		return ksdz1;
	}
	public int getKsdz2() {
		return ksdz2;
	}
	public int getKsdz3() {
		return ksdz3;
	}

	public void setKsdz(int ksdz) {
		this.ksdz = ksdz;
	}
	public void setKsdz1(int ksdz1) {
		this.ksdz1 = ksdz1;
	}
	public void setKsdz2(int ksdz2) {
		this.ksdz2 = ksdz2;
	}
	public void setKsdz3(int ksdz3) {
		this.ksdz3 = ksdz3;
	}

	public int getJsdz() {
		return jsdz;
	}
	public int getJsdz1() {
		return jsdz1;
	}
	public int getJsdz2() {
		return jsdz2;
	}
	public int getJsdz3() {
		return jsdz3;
	}

	public void setJsdz(int jsdz) {
		this.jsdz = jsdz;
	}
	public void setJsdz1(int jsdz1) {
		this.jsdz1 = jsdz1;
	}
	public void setJsdz2(int jsdz2) {
		this.jsdz2 = jsdz2;
	}
	public void setJsdz3(int jsdz3) {
		this.jsdz3 = jsdz3;
	}

	public int getKzqbsm() {
		return kzqbsm;
	}

	public void setKzqbsm(int kzqbsm) {
		this.kzqbsm = kzqbsm;
	}

	public int getGoodCount() {
		return goodCount;
	}

	public void setGoodCount(int goodCount) {
		this.goodCount = goodCount;
	}

	public int getErrorCount() {
		return errorCount;
	}

	public void setErrorCount(int errorCount) {
		this.errorCount = errorCount;
	}


	public int getWdkz() {
		return wdkz;
	}

	public void setWdkz(int wdkz) {
		this.wdkz = wdkz;
	}


	public int getWdld() {
		return wdld;
	}

	public void setWdld(int wdld) {
		this.wdld = wdld;
	}

	public int getLdsc() {
		return ldsc;
	}

	public void setLdsc(int ldsc) {
		this.ldsc = ldsc;
	}

	public int getMdsc() {
		return mdsc;
	}

	public void setMdsc(int mdsc) {
		this.mdsc = mdsc;
	}

	public int getHdys() {
		return hdys;
	}

	public void setHdys(int hdys) {
		this.hdys = hdys;
	}

	public int getMqys() {
		return mqys;
	}

	public void setMqys(int mqys) {
		this.mqys = mqys;
	}

	public int getHsjsdzsl() {
		return hsjsdzsl;
	}

	public void setHsjsdzsl(int hsjsdzsl) {
		this.hsjsdzsl = hsjsdzsl;
	}

	public List<Lamp> getLamps() {
		return lamps;
	}

	public void setLamps(List<Lamp> lamps) {
		this.lamps = lamps;
	}

	public List<LampAddress> getLampAddresses() {
		return lampAddresses;
	}

	public void setLampAddresses(List<LampAddress> lampAddresses) {
		this.lampAddresses = lampAddresses;
	}

	public List<LampAddress> getLampAddresses1() {
		return lampAddresses1;
	}

	public void setLampAddresses1(List<LampAddress> lampAddresses1) {
		this.lampAddresses1 = lampAddresses1;
	}

	public List<LampAddress> getLampAddresses2() {
		return lampAddresses2;
	}

	public void setLampAddresses2(List<LampAddress> lampAddresses2) {
		this.lampAddresses2 = lampAddresses2;
	}

	public List<LampAddress> getLampAddresses3() {
		return lampAddresses3;
	}

	public void setLampAddresses3(List<LampAddress> lampAddresses3) {
		this.lampAddresses3 = lampAddresses3;
	}

	public int getWdsl() {
		return wdsl;
	}

	public void setWdsl(int wdsl) {
		this.wdsl = wdsl;
	}

	public String getWdkzsm() {
		return wdkzsm;
	}

	public void setWdkzsm(String wdkzsm) {
		this.wdkzsm = wdkzsm;
	}

	public Long getGxsj() {
		return gxsj;
	}

	public void setGxsj(Long gxsj) {
		this.gxsj = gxsj;
	}


	public int getWdcxzt() {
		return wdcxzt;
	}

	public void setWdcxzt(int wdcxzt) {
		this.wdcxzt = wdcxzt;
	}

	public String getWdcxztsm() {
		return wdcxztsm;
	}

	public void setWdcxztsm(String wdcxztsm) {
		this.wdcxztsm = wdcxztsm;
	}

	public int getKzqdk() {
		return kzqdk;
	}

	public void setKzqdk(int kzqdk) {
		this.kzqdk = kzqdk;
	}

	public boolean isJcld() {
		return jcld;
	}

	public void setJcld(boolean jcld) {
		this.jcld = jcld;
	}

	public int getStartHour1() {
		return startHour1;
	}

	public void setStartHour1(int startHour1) {
		this.startHour1 = startHour1;
	}

	public int getStartMinute1() {
		return startMinute1;
	}

	public void setStartMinute1(int startMinute1) {
		this.startMinute1 = startMinute1;
	}

	public int getStopHour1() {
		return stopHour1;
	}

	public void setStopHour1(int stopHour1) {
		this.stopHour1 = stopHour1;
	}

	public int getStopMinute1() {
		return stopMinute1;
	}

	public void setStopMinute1(int stopMinute1) {
		this.stopMinute1 = stopMinute1;
	}

	public int getMonth1() {
		return month1;
	}

	public void setMonth1(int month1) {
		this.month1 = month1;
	}

	public int getDay1() {
		return day1;
	}

	public void setDay1(int day1) {
		this.day1 = day1;
	}

	public int getWdkz1() {
		return wdkz1;
	}

	public void setWdkz1(int wdkz1) {
		this.wdkz1 = wdkz1;
	}

	public int getWdld1() {
		return wdld1;
	}

	public void setWdld1(int wdld1) {
		this.wdld1 = wdld1;
	}

	public int getZkb1() {
		return zkb1;
	}

	public void setZkb1(int zkb1) {
		this.zkb1 = zkb1;
	}

	public int getHdys1() {
		return hdys1;
	}

	public void setHdys1(int hdys1) {
		this.hdys1 = hdys1;
	}

	public int getMqys1() {
		return mqys1;
	}

	public void setMqys1(int mqys1) {
		this.mqys1 = mqys1;
	}

	public int getHsjsdzsl1() {
		return hsjsdzsl1;
	}

	public void setHsjsdzsl1(int hsjsdzsl1) {
		this.hsjsdzsl1 = hsjsdzsl1;
	}

	public boolean isSfsyxl1() {
		return sfsyxl1;
	}

	public void setSfsyxl1(boolean sfsyxl1) {
		this.sfsyxl1 = sfsyxl1;
	}

	public int getStartHour2() {
		return startHour2;
	}

	public void setStartHour2(int startHour2) {
		this.startHour2 = startHour2;
	}

	public int getStartMinute2() {
		return startMinute2;
	}

	public void setStartMinute2(int startMinute2) {
		this.startMinute2 = startMinute2;
	}

	public int getStopHour2() {
		return stopHour2;
	}

	public void setStopHour2(int stopHour2) {
		this.stopHour2 = stopHour2;
	}

	public int getStopMinute2() {
		return stopMinute2;
	}

	public void setStopMinute2(int stopMinute2) {
		this.stopMinute2 = stopMinute2;
	}

	public int getMonth2() {
		return month2;
	}

	public void setMonth2(int month2) {
		this.month2 = month2;
	}

	public int getDay2() {
		return day2;
	}

	public void setDay2(int day2) {
		this.day2 = day2;
	}

	public int getWdkz2() {
		return wdkz2;
	}

	public void setWdkz2(int wdkz2) {
		this.wdkz2 = wdkz2;
	}

	public int getWdld2() {
		return wdld2;
	}

	public void setWdld2(int wdld2) {
		this.wdld2 = wdld2;
	}

	public int getZkb2() {
		return zkb2;
	}

	public void setZkb2(int zkb2) {
		this.zkb2 = zkb2;
	}

	public int getHdys2() {
		return hdys2;
	}

	public void setHdys2(int hdys2) {
		this.hdys2 = hdys2;
	}

	public int getMqys2() {
		return mqys2;
	}

	public void setMqys2(int mqys2) {
		this.mqys2 = mqys2;
	}

	public int getHsjsdzsl2() {
		return hsjsdzsl2;
	}

	public void setHsjsdzsl2(int hsjsdzsl2) {
		this.hsjsdzsl2 = hsjsdzsl2;
	}

	public boolean isSfsyxl2() {
		return sfsyxl2;
	}

	public void setSfsyxl2(boolean sfsyxl2) {
		this.sfsyxl2 = sfsyxl2;
	}

	public int getStartHour3() {
		return startHour3;
	}

	public void setStartHour3(int startHour3) {
		this.startHour3 = startHour3;
	}

	public int getStartMinute3() {
		return startMinute3;
	}

	public void setStartMinute3(int startMinute3) {
		this.startMinute3 = startMinute3;
	}

	public int getStopHour3() {
		return stopHour3;
	}

	public void setStopHour3(int stopHour3) {
		this.stopHour3 = stopHour3;
	}

	public int getStopMinute3() {
		return stopMinute3;
	}

	public void setStopMinute3(int stopMinute3) {
		this.stopMinute3 = stopMinute3;
	}

	public int getMonth3() {
		return month3;
	}

	public void setMonth3(int month3) {
		this.month3 = month3;
	}

	public int getDay3() {
		return day3;
	}

	public void setDay3(int day3) {
		this.day3 = day3;
	}

	public int getWdkz3() {
		return wdkz3;
	}

	public void setWdkz3(int wdkz3) {
		this.wdkz3 = wdkz3;
	}

	public int getWdld3() {
		return wdld3;
	}

	public void setWdld3(int wdld3) {
		this.wdld3 = wdld3;
	}

	public int getZkb3() {
		return zkb3;
	}

	public void setZkb3(int zkb3) {
		this.zkb3 = zkb3;
	}

	public int getHdys3() {
		return hdys3;
	}

	public void setHdys3(int hdys3) {
		this.hdys3 = hdys3;
	}

	public int getMqys3() {
		return mqys3;
	}

	public void setMqys3(int mqys3) {
		this.mqys3 = mqys3;
	}

	public int getHsjsdzsl3() {
		return hsjsdzsl3;
	}

	public void setHsjsdzsl3(int hsjsdzsl3) {
		this.hsjsdzsl3 = hsjsdzsl3;
	}

	public boolean isSfsyxl3() {
		return sfsyxl3;
	}

	public void setSfsyxl3(boolean sfsyxl3) {
		this.sfsyxl3 = sfsyxl3;
	}

	public int getTimeIndex() {
		return timeIndex;
	}

	public void setTimeIndex(int timeIndex) {
		this.timeIndex = timeIndex;
	}

	public String getZkb1sm() {
		return zkb1sm;
	}

	public void setZkb1sm(String zkb1sm) {
		this.zkb1sm = zkb1sm;
	}

	public String getZkb2sm() {
		return zkb2sm;
	}

	public void setZkb2sm(String zkb2sm) {
		this.zkb2sm = zkb2sm;
	}

	public String getZkb3sm() {
		return zkb3sm;
	}

	public void setZkb3sm(String zkb3sm) {
		this.zkb3sm = zkb3sm;
	}

	public boolean isReadSuccess1() {
		return readSuccess1;
	}

	public void setReadSuccess1(boolean readSuccess1) {
		this.readSuccess1 = readSuccess1;
	}

	public boolean isReadSuccess2() {
		return readSuccess2;
	}

	public void setReadSuccess2(boolean readSuccess2) {
		this.readSuccess2 = readSuccess2;
	}

	public boolean isReadSuccess3() {
		return readSuccess3;
	}

	public void setReadSuccess3(boolean readSuccess3) {
		this.readSuccess3 = readSuccess3;
	}

	public String getWdkz1sm() {
		return wdkz1sm;
	}

	public void setWdkz1sm(String wdkz1sm) {
		this.wdkz1sm = wdkz1sm;
	}

	public String getWdkz2sm() {
		return wdkz2sm;
	}

	public void setWdkz2sm(String wdkz2sm) {
		this.wdkz2sm = wdkz2sm;
	}

	public String getWdkz3sm() {
		return wdkz3sm;
	}

	public void setWdkz3sm(String wdkz3sm) {
		this.wdkz3sm = wdkz3sm;
	}

	public int getGgsz() {
		return ggsz;
	}

	public void setGgsz(int ggsz) {
		this.ggsz = ggsz;
	}

	/**
	 * 是否转发能见度
	 */
	public boolean isZfnjd() {
		return zfnjd;
	}

	public void setZfnjd(boolean zfnjd) {
		this.zfnjd = zfnjd;
	}

	/**
	 * 控制源
	 */
	public int getKzy() {
		return kzy;
	}

	public void setKzy(int kzy) {
		this.kzy = kzy;
	}

	public String getKzysm() {
		return kzysm;
	}

	public void setKzysm(String kzysm) {
		this.kzysm = kzysm;
	}

	public int getWdlddj() {
		return wdlddj;
	}

	public void setWdlddj(int wdlddj) {
		this.wdlddj = wdlddj;
	}

	public int getSspl() {
		return sspl;
	}

	public void setSspl(int sspl) {
		this.sspl = sspl;
	}

	public int getZkb() {
		return zkb;
	}

	public void setZkb(int zkb) {
		this.zkb = zkb;
	}

	public String getWdlddjsm() {
		return wdlddjsm;
	}

	public void setWdlddjsm(String wdlddjsm) {
		this.wdlddjsm = wdlddjsm;
	}

	public String getSsplsm() {
		return ssplsm;
	}

	public void setSsplsm(String ssplsm) {
		this.ssplsm = ssplsm;
	}

	public String getZkbsm() {
		return zkbsm;
	}

	public void setZkbsm(String zkbsm) {
		this.zkbsm = zkbsm;
	}

	public boolean isDcqygj() {
		return dcqygj;
	}

	public void setDcqygj(boolean dcqygj) {
		this.dcqygj = dcqygj;
	}

	public int getDcdl() {
		return dcdl;
	}

	public void setDcdl(int dcdl) {
		this.dcdl = dcdl;
	}

	public String getDcdy() {
		return dcdy;
	}

	public void setDcdy(String dcdy) {
		this.dcdy = dcdy;
	}

	public String getTyndy() {
		return tyndy;
	}

	public void setTyndy(String tyndy) {
		this.tyndy = tyndy;
	}

	public String getCddl() {
		return cddl;
	}

	public void setCddl(String cddl) {
		this.cddl = cddl;
	}

	public boolean isHasSolarEnergyData() {
		return hasSolarEnergyData;
	}

	public void setHasSolarEnergyData(boolean hasSolarEnergyData) {
		this.hasSolarEnergyData = hasSolarEnergyData;
	}

	public List<ControllerText> getControllerTexts() {
		return controllerTexts;
	}

	public void setControllerTexts(List<ControllerText> controllerTexts) {
		this.controllerTexts = controllerTexts;
	}

	public int getWzmk1() {
		return wzmk1;
	}

	public void setWzmk1(int wzmk1) {
		this.wzmk1 = wzmk1;
	}

	public int getWzmk2() {
		return wzmk2;
	}

	public void setWzmk2(int wzmk2) {
		this.wzmk2 = wzmk2;
	}

	public int getWdgz() {
		return wdgz;
	}

	public void setWdgz(int wdgz) {
		this.wdgz = wdgz;
	}

	public int getSfgs() {
		return sfgs;
	}

	public void setSfgs(int sfgs) {
		this.sfgs = sfgs;
	}

	public int getGs_Lddj() {
		return gs_Lddj;
	}

	public void setGs_Lddj(int gs_Lddj) {
		this.gs_Lddj = gs_Lddj;
	}

	public int getGs_Sspl() {
		return gs_Sspl;
	}

	public void setGs_Sspl(int gs_Sspl) {
		this.gs_Sspl = gs_Sspl;
	}

	public int getGs_Zkb() {
		return gs_Zkb;
	}

	public void setGs_Zkb(int gs_Zkb) {
		this.gs_Zkb = gs_Zkb;
	}

	public int getLxbh() {
		return lxbh;
	}

	public void setLxbh(int lxbh) {
		this.lxbh = lxbh;
	}

	/**
	 * 定时触发 3
	 */
	public int getDscf() {
		return dscf;
	}

	public void setDscf(int dscf) {
		this.dscf = dscf;
	}

	/**
	 * 气象触发 4
	 */
	public int getQxcf() {
		return qxcf;
	}

	public void setQxcf(int qxcf) {
		this.qxcf = qxcf;
	}

	/**
	 * 触发手动 1
	 */
	public int getCfsd() {
		return cfsd;
	}

	public void setCfsd(int cfsd) {
		this.cfsd = cfsd;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public boolean isZcwz() {
		//return zcwz;
		return true;
	}

	public void setZcwz(boolean zcwz) {
		this.zcwz = zcwz;
	}
}
